﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;

public class SceneButton : MonoBehaviour
{
    [Header("按钮类型")]
    public ButtonType buttonType;
    [Header("粒子效果")]
    public ParticleSystem buttonEff;

    private void OnMouseDown()
    {
        // UI点击屏蔽
        if (EventSystem.current.IsPointerOverGameObject())
            return;
        AudioManager.Instance.PlayChoiceSound();
        if (buttonEff)
            buttonEff.Play();
        PassengerManager.Instance.PlayerChoice(buttonType);
    }
}

// 按钮类型
public enum ButtonType
{
    OK,
    NOTOK
}

